package com.sicau.smarttraceplatform.entity.param.trace.baseparam;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * 耕种管收数据添加入参
 * </p>
 *
 * @author sxt
 * @since 2020-05-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel("耕种管收数据基本参数")
public class TraceBaseParam implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空")
    @Size(max = 32, message = "商品名称长度最大只能为{max}")
    @ApiModelProperty("商品名称")
    private String goodsName;

    /**
     * 地块ID
     */
    @NotBlank(message = "地块ID不能为空")
    @Size(max = 32, message = "地块ID长度最大只能为{max}")
    @ApiModelProperty("地块ID")
    private String landParcelId;

    /**
     * 种植开始时间
     */
    @ApiModelProperty("种植开始时间")
    private LocalDate plantStartTime;

    /**
     * 种植结束时间
     */
    @ApiModelProperty("种植结束时间")
    private LocalDate plantEndTime;

    /**
     * 品类
     */
    @Size(max = 64, message = "品类长度最大只能为{max}")
    @NotBlank(message = "品类不能为空")
    @ApiModelProperty("品类")
    private String category;

    /**
     * 负责人id
     */
    @Size(max = 32, message = "负责人id长度最大只能为{max}")
    @ApiModelProperty("负责人id")
    private String userId;

    /**
     * 地区id
     */
    @NotNull(message = "地区id不能为空")
    @ApiModelProperty("地区id")
    private Integer areaId;

    /**
     * 类别ID
     */
    @Size(max = 32, message = "类别ID长度最大只能为{max}")
    @NotBlank(message = "类别ID不能为空")
    @ApiModelProperty("类别ID")
    private String categoryId;


}
